package cn.micro.eye.convert;

import cn.micro.eye.entity.Member;
import cn.micro.eye.model.add.MemberAdd;
import cn.micro.eye.model.dto.MemberPageDTO;
import cn.micro.eye.model.edit.MemberEdit;
import cn.micro.eye.model.query.MemberPageQuery;
import cn.micro.eye.model.vo.MemberInfoVO;
import cn.micro.eye.model.vo.MemberPageVO;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

@Mapper(componentModel = "spring")
public interface MemberConvert {

    MemberConvert INSTANCE = Mappers.getMapper(MemberConvert.class);

    Page<MemberPageVO> toPage(Page<Member> page);

    MemberPageVO toVO(Member member);

    Member toEntityEdit(MemberEdit memberEdit);

    MemberPageDTO copy(MemberPageQuery memberPageQuery);

    Member copy(Member member);

    Member toEntity(MemberAdd memberAdd);

    MemberInfoVO copyMemberInfo(Member member);

}
